using FireStarterModeller.BO;

namespace FireStarterModeller.Test.BO
{
    public class TestUtilsDMDatabaseLookupList
    {
        /// <summary>
        /// Creates a new saved DMLookupListDatabase with a random value assigned to every property
        /// </summary>
        public static DMLookupListDatabase CreateSavedDMDatabaseLookupList()
        {
            DMLookupListDatabase dMLookupListDatabase = CreateUnsavedValidDMDatabaseLookupList();
            dMLookupListDatabase.Save();
            return dMLookupListDatabase;
        }

        /// <summary>
        /// Creates a new unsaved DMLookupListDatabase with a random value assigned to every property
        /// </summary>
        public static DMLookupListDatabase CreateUnsavedValidDMDatabaseLookupList()
        {
            DMLookupListDatabase dMLookupListDatabase = new DMLookupListDatabase();
            dMLookupListDatabase.Sql = TestUtilsShared.GetRandomString();
            dMLookupListDatabase.TimeOut = (decimal) TestUtilsShared.GetRandomInt();
            dMLookupListDatabase.LookupClassName = TestUtilsShared.GetRandomString();
            dMLookupListDatabase.Assembly = TestUtilsShared.GetRandomString();
            dMLookupListDatabase.Generated = TestUtilsShared.GetRandomBoolean();
            return dMLookupListDatabase;
        }

        /// <summary>
        /// Creates a new unsaved DMLookupListDatabase where all properties are null, except ID properties
        /// and those with default values.  If there are compulsory properties without
        /// defaults, saving the object will throw an exception.
        /// </summary>
        public static DMLookupListDatabase CreateUnsavedDefaultDMDatabaseLookupList()
        {
            DMLookupListDatabase dMLookupListDatabase = new DMLookupListDatabase();
            return dMLookupListDatabase;
        }
    }
}